<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BSGroup
 *
 * @author jianfeng
 */
class BWGroup extends BGroup {

    public $parentId = 0;

    //put your code here
    public function getModelClass($data = NULL) {
        $class = get_class($this);
        $mClass = preg_replace("/^BW/", 'BWM', $class);
        return $mClass;
    }

    public function getMemberModelClass($data = NULL) {
        return $this->getModelClass() . 'Member';
    }

    public function getRepository($data = NULL, $reload = FALSE) {
        $repository = parent::getRepository($data, $reload);
        $modelClass = $this->getModelClass();
        $repository->setModel($modelClass);
        return $repository;
    }

}
